package com.example.booksales.service.impl;

import com.example.booksales.domain.Employee;
import com.example.booksales.mapper.EmployeeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServicelmpl implements EmployeeService {
    @Autowired
    EmployeeMapper employeeMapper;
    @Override
    public List<Employee> getAllEmployees() {
        return employeeMapper.getAllEmployees();
    }
    public Employee selectEmployeeById(Long employeeid) {
        return employeeMapper.selectEmployeeById(employeeid);
    }
    @Override
    public int insertEmployee(Employee employee){
        return employeeMapper.insertEmployee(employee);
    }
    @Override
    public int updateEmployee(Employee employee){
            return employeeMapper.updateEmployee(employee);
    }
    @Override
    public int deleteEmployeeById(Long employeeid){
        return employeeMapper.deleteEmployeeById(employeeid);
    }
}
